import Vue from "vue";
import "@/utils/extend";

const filters = {
  money: function (value) {
    if (!value) return "";
    return value.toMoney();
  },
  datetime: function (value) {
    if (!value) return "";
    return new Date(value).format("yyyy-MM-dd HH:mm:ss")
  },
};

Vue.filter("money", filters.money);
Vue.filter("datetime", filters.datetime);

export default filters;
